<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:nyext="urn:noury-extensions">
  <xsl:output method="text" encoding="UTF-8"/>

  <xsl:param name="package" />
  <xsl:param name="outdir" />
  <xsl:param name="name" />
  <xsl:param name="domainName" />
  <xsl:variable name="domain" select="/manifest/types/domain[@name=$domainName]" />

  <xsl:include href="functions.xslt" />

  <xsl:template name="generate-model-file">
  <xsl:variable name="src">
  <xsl:text>//$Id:$

using System;
using Salamanca.DataAccess.Collections;

namespace </xsl:text>
          <xsl:value-of select="$package"/>
          <xsl:text>
{



    partial interface IDataActivityParameters
    {

        /// &lt;summary&gt;Gets or sets the data mappers used to handle domain models in a data oriented activity.&lt;/summary&gt;
        DataMapperCollection DataMappers { get; }
    }

}
</xsl:text>
  </xsl:variable>
  <xsl:value-of select="nyext:generateFile($src, nyext:combinePath($outdir, concat(nyext:getModelFileName($name), '.cs')))" />
</xsl:template>

  <xsl:template name="generate-user-file">
      <xsl:text>//$Id

using System;
using Salamanca.DataActivities;

namespace </xsl:text>
      <xsl:value-of select="$package"/>
      <xsl:text>
{



    ///////////////////////////////////////////////////////////////////////////
    ///
    /// &lt;summary&gt;Interface implemented by data oriented activity parameters.&lt;/summary&gt;
    ///
    ///////////////////////////////////////////////////////////////////////////

    public partial interface IDataActivityParameters:
        IActivityParameters
    {
    }

}
</xsl:text>
  </xsl:template>

  <xsl:template match="/">
    <xsl:call-template name="generate-model-file" />
    <xsl:call-template name="generate-user-file" />
  </xsl:template>
</xsl:stylesheet>
